package com.sb.framework.bean;

/**
 * 
 * @author alan
 * 
 */
public class RestStatus {

	private Boolean	status;
	private String	code;
	private String	message;
	
	protected RestStatus(){
		
	}

	public RestStatus(String code, String message) {

		if (code.equals( RestStatus.CODE_200 )) {
			this.status = true;
		} else {
			this.status = false;
		}
		this.code = code;
		this.message = message;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	/**
	 * 内部错误
	 */
	public static final String	CODE_500				= "500";
	/**
	 * 正常
	 */
	public static final String	CODE_200				= "200";
	/**
	 * 路径错误
	 */
	public static final String	CODE_404				= "404";
	/**
	 * 异常
	 */
	public static final String	CODE_999				= "999";

	public static final String	CODE_500_MSG			= "内部错误";	// 内部错误
	public static final String	CODE_200_MSG			= "请求成功";	// 正常
	public static final String	CODE_404_MSG			= "路径错误";	// 路径错误
	public static final String	CODE_999_MSG			= "异常";		// 异常
}
